home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
039a
/
pdm_106.zip
/
PDMDEMO2.PRG
< prev
next >
Wrap
Text File
|
1991-06-08
|
11KB
|
298 lines
*≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
* Program Name: PDMDEMO2.PRG
* Description.: Driver for PDM Menu System program
* Language....: Clipper S'87
* LIB required: CC.LIB v1.04, EXTEND.LIB
* Gen Time....: 06/08/91 17:58:59
* Generated by: PDM Sys - the ClipCode Pull Down Menu System v1.06
*≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
*** Set CLIPPER Environment ***
SET CURSOR OFF
SET DELETED ON && Filter out Deleted Records
SET EXACT ON
SET SCOREBOARD OFF
SET SOFTSEEK OFF
PDMSETUP()
*** Set Color for Initial Screen ***
SET COLOR TO ( PDM_CONFG[7] )
@1,0 SAY REPLICATE( CHR( PDM_CONFG[8] ), 1840 ) && char for init screen
SET COLOR TO ( PDM_COLOR[1] ) && hcolor when not selected
@ PDM_CONFG[2],00
SET COLOR TO ( PDM_CONFG[6] ) && color for init bottom panel
@ PDM_CONFG[4],00
@ PDM_CONFG[4],00 SAY PDM_CONFG[9] && text for init bottom panel
MENUPD( 0, 0 ) && just display h menu
PRIVATE key, hOpt, vOpt, pdSEL, sv_panel
pdSel= 1
DO WHILE .T.
*SETCANCEL(.F.) && Disable alt-C interrupt
INKEY(0)
key= LASTKEY() && key= INKEY(0) misses alt-D
*SETCANCEL(.T.) && Enable alt-C interrupt
DO CASE
*?*CASE key = 28 && F1=Help
*?*CASE key = -2 && F3=Exit
*** EXIT2DOS()
CASE key = 27 && Exit
PRIVATE Opts[2]
Opts[1]= "Yes"
Opts[2]= "No"
* Syntx: message text, [ title,prmpts,colors,mRow,mColm,TmO ]
IF BOXMSG( "Exit Program to DOS?",.F., Opts ) = 1
EXIT
ELSE
LOOP
ENDIF
CASE key = -9 && F10=Menu
hOpt= 1
vOpt= 0
*?*CASE key = 3 && PgDn=Next
*** SKIP 1
*** IF EOF()
*** BOXMSG( "At End-of-File" )
*** SKIP -1
*** ENDIF
*?*CASE key = 18 && PgUp=Prev
*** SKIP -1
*** IF BOF()
*** BOXMSG( "At Beginning-of-File" )
*** ENDIF
CASE ASCAN( PDM_HOTKY, key ) > 0 && If found, returns the ss
hOpt= ASCAN( PDM_HOTKY, key )
vOpt= 1
OTHERWISE
LOOP
ENDCASE
IF hOpt < 1
LOOP
ENDIF
sv_panel= BOXSAVE( PDM_CONFG[4],00, PDM_CONFG[4],79 )
pdSel = 1
DO WHILE pdSel <> 0
pdSel= MENUPD( @hOpt, @vOpt )
IF pdSel > 0
DO CASE
OTHERWISE
* Syntx: message text/array, [ title,prmpts,colors,mRow,mColm,TmO ]
BOXMSG( "PDM Option Selected: "+LTRIM( STR(pdSel) ) )
ENDCASE
ENDIF
ENDDO WHILE pdSel <> 0
BOXREST( sv_panel )
ENDDO
SET COLOR TO
SET CURSOR ON
CLEAR
QUIT && End of: MAIN LINE
*≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
*------------------------------------------------------------------------------*
* Function....: PDMSETUP()
* Purpose.....: UDF to Create PDMSETUP()
* Parameters..: none
* Generated by: PDM - the ClipCode Pull Down Menu System
* Assumption..: the presence of these PUBLIC arrays:
* : <arrC>: PDM_HPROM = horizontal menu prompt text
* : <arrN>: PDM_HCOLM = horizontal starting columns for prompts
* : <arrC>: PDM_HTRIG = horizontal trigger letters
* : <arrN>: PDM_HTPOS = horizontal trigger letter positions
* : <arrN>: PDM_VSS1 = starting array subscript
* : <arrN>: PDM_VSS2 = ending array subscript
* : <arrC>: PDM_VPROM = vertical menu prompt text
* : <arrC>: PDM_VTRIG = vertical trigger letters
* : <arrN>: PDM_VCOLM = vertical starting columns for v prompts
* : <arrN>: PDM_VTPOS = vertical trigger letter positions
* : <arrL>: PDM_VACTV = vertical active status array
* : <arrC>: PDM_COLOR = PDM color strings for SET COLOR TO
* [ 1] hcolor when not selected
* [ 2] hcolor for unselected trigger
* [ 3] hcolor for selected option
* [ 4] hcolor for selected trigger
* [ 5] vcolor for box
* [ 6] vcolor when not selected
* [ 7] vcolor for unselected trigger
* [ 8] vcolor for selected option
* [ 9] vcolor for selected trigger
* [10] vcolor for inactive option
* [11] vcolor for message row
* : <arrC>: PDM_VMSSG = vertical message help text
* : <arrX>: PDM_CONFG = PDM configuration
* [1] = expN: box type: 0,1,2
* [2] = expN: row for horiz menu
* [3] = expN: row for box top
* [4] = expN: message row
* [5] = expN: time out
* [6] = expC: color for init bottom panel
* [7] = expC: color for init screen
* [8] = expN: char for init screen
* [9] = expC: text for init bottom panel
* Calls.......: PDM_INIT()
* CC.LIB Calls: ALONGEST(), ATNEXT()
* Language....: Clipper S'87
* Returns.....: <expL>: .T.
*------------------------------------------------------------------------------*
FUNCTION PDMSETUP
PRIVATE dimh, dimv, ss
*** MENUPD Horizontal ***
dimh= 5
PUBLIC PDM_HPROM[dimh] && horizontal menu prompt text
PDM_HPROM[1]= " File "
PDM_HPROM[2]= " Edit "
PDM_HPROM[3]= " System "
PDM_HPROM[4]= " Help "
PDM_HPROM[5]= " Quit "
PUBLIC PDM_HCOLM[dimh] && horizontal starting columns for prompts
PDM_HCOLM[1]= 1
PDM_HCOLM[2]= 7
PDM_HCOLM[3]= 13
PDM_HCOLM[4]= 21
PDM_HCOLM[5]= 27
PUBLIC PDM_HOTKY[dimh] && horiz Hot/alt keys INKEY()
PDM_HOTKY[1]= 289
PDM_HOTKY[2]= 274
PDM_HOTKY[3]= 287
PDM_HOTKY[4]= 291
PDM_HOTKY[5]= 272
PUBLIC PDM_HTRIG[dimh] && horizontal trigger letters
PDM_HTRIG[1]= "F"
PDM_HTRIG[2]= "E"
PDM_HTRIG[3]= "S"
PDM_HTRIG[4]= "H"
PDM_HTRIG[5]= "Q"
PUBLIC PDM_HTPOS[dimh] && horizontal trigger letter positions
PDM_HTPOS[1]= 2
PDM_HTPOS[2]= 2
PDM_HTPOS[3]= 2
PDM_HTPOS[4]= 2
PDM_HTPOS[5]= 2
*** PDMENUV Vertical ***
PUBLIC PDM_VSS1[dimh] && starting array subscript
PDM_VSS1[1]= 1
PDM_VSS1[2]= 7
PDM_VSS1[3]= 9
PDM_VSS1[4]= 11
PDM_VSS1[5]= 14
dimv= 14
PUBLIC PDM_VPROM[dimv] && vertical menu prompt text
PDM_VPROM[ 1]= " Roll Summary File "
PDM_VPROM[ 2]= " Defect Master File "
PDM_VPROM[ 3]= " Style Master File "
PDM_VPROM[ 4]= " Control File "
PDM_VPROM[ 5]= "-"
PDM_VPROM[ 6]= " Parameters File "
PDM_VPROM[ 7]= " Time & Date "
PDM_VPROM[ 8]= " Environment "
PDM_VPROM[ 9]= " Monitor Type "
PDM_VPROM[10]= " Keyboard Type "
PDM_VPROM[11]= " Message Queue "
PDM_VPROM[12]= " Help Text "
PDM_VPROM[13]= " Key assignments "
PDM_VPROM[14]= " Exit Program "
PUBLIC PDM_VTRIG[dimv] && vertical trigger letters
PDM_VTRIG[ 1]= "R"
PDM_VTRIG[ 2]= "D"
PDM_VTRIG[ 3]= "S"
PDM_VTRIG[ 4]= "C"
PDM_VTRIG[ 5]= "-"
PDM_VTRIG[ 6]= "P"
PDM_VTRIG[ 7]= "T"
PDM_VTRIG[ 8]= "E"
PDM_VTRIG[ 9]= "M"
PDM_VTRIG[10]= "K"
PDM_VTRIG[11]= "M"
PDM_VTRIG[12]= "H"
PDM_VTRIG[13]= "K"
PDM_VTRIG[14]= "E"
PUBLIC PDM_VTPOS[dimv] && vertical trigger letter positions
PDM_VTPOS[ 1]= 2
PDM_VTPOS[ 2]= 2
PDM_VTPOS[ 3]= 2
PDM_VTPOS[ 4]= 2
PDM_VTPOS[ 5]= 1
PDM_VTPOS[ 6]= 2
PDM_VTPOS[ 7]= 2
PDM_VTPOS[ 8]= 2
PDM_VTPOS[ 9]= 2
PDM_VTPOS[10]= 2
PDM_VTPOS[11]= 2
PDM_VTPOS[12]= 2
PDM_VTPOS[13]= 2
PDM_VTPOS[14]= 2
PUBLIC PDM_VACTV[dimv] && vertical active status array
AFILL( PDM_VACTV, .T. )
PDM_VACTV[ 4]= .F.
PDM_VACTV[ 5]= .F.
PUBLIC PDM_VMSSG[dimv] && vertical message help text
PDM_VMSSG[ 1]= "View the Roll Summary File"
PDM_VMSSG[ 2]= "View the Defect Master File"
PDM_VMSSG[ 3]= "View the Style Master File"
PDM_VMSSG[ 4]= "View the System Control File (SysOp Security required)"
PDM_VMSSG[ 5]= "-"
PDM_VMSSG[ 6]= "View Parameters File"
PDM_VMSSG[ 7]= "Update the System Time & Date"
PDM_VMSSG[ 8]= "Modify System Environment variables"
PDM_VMSSG[ 9]= "Specify Color of Monochrome Monitor Type"
PDM_VMSSG[10]= "Specify Keyboard Type"
PDM_VMSSG[11]= "Display System Message Log"
PDM_VMSSG[12]= "Display Indexed Help Text"
PDM_VMSSG[13]= "View Key assignments"
PDM_VMSSG[14]= "Exit to DOS command prompt"
PUBLIC PDM_COLOR[11] && PDM color strings for SET COLOR TO
PDM_COLOR[ 1]= "B/W" && [ 1] hcolor when not selected
PDM_COLOR[ 2]= "B+/W" && [ 2] hcolor for unselected trigger
PDM_COLOR[ 3]= "W+/R" && [ 3] hcolor for selected option
PDM_COLOR[ 4]= "W+/R" && [ 4] hcolor for selected trigger
PDM_COLOR[ 5]= "W+/B" && [ 5] vcolor for box
PDM_COLOR[ 6]= "W/B" && [ 6] vcolor when not selected
PDM_COLOR[ 7]= "W+/B" && [ 7] vcolor for unselected trigger
PDM_COLOR[ 8]= "R/W" && [ 8] vcolor for selected option
PDM_COLOR[ 9]= "R/W" && [ 9] vcolor for selected trigger
PDM_COLOR[10]= "R/B" && [10] vcolor for inactive option
PDM_COLOR[11]= "N/W" && [11] vcolor for message row
PUBLIC PDM_CONFG[9] && PDM configuration
PDM_CONFG[1]= 1 && [1] = expN: box type: 0,1,2
PDM_CONFG[2]= 0 && [2] = expN: row for horiz menu
PDM_CONFG[3]= 2 && [3] = expN: row for box top
PDM_CONFG[4]= 24 && [4] = expN: message row
PDM_CONFG[5]= 0 && [5] = expN: time out
PDM_CONFG[6]= "N/W" && [6] = expC: color for init bottom panel
PDM_CONFG[7]= "W+/B" && [7] = expC: color for init screen
PDM_CONFG[8]= 176 && [8] = expN: char for init screen
* && [9] = expC: text for init bottom panel
PDM_CONFG[9]= " Enter=Select Esc=Cancel F1=Help F10=Menu "
PDM_INIT() && Initialize remaining optional PDM PUBLIC arrays
RETURN .T. && End of: PDMSETUP()
*------------------------------------------------------------------------------*
*<eof>